import React, { Component } from 'react';
import { inject, observer } from 'mobx-react'

@inject('cartStore')
@observer
class AppleCount extends Component {
    render () {
        const { appleEaten, appleNow } = this.props.cartStore.status
        return (
            <div className="stats">
                <div className="section">
                    <div className="head">当前</div>
                    <div className="content">{appleNow.num}个苹果，{appleNow.weight}克</div>
                </div>
                <div className="section">
                    <div className="head">已吃掉</div>
                    <div className="content">{appleEaten.num}个苹果，{appleEaten.weight}克</div>
                </div>
            </div>
        );
    }
}

export default AppleCount;
